Skip to content

fix(id): unbreak main checks — E0382, clippy denied lints, dht_testnet dev-dep, formatter drift (#8904) - #10548

Merged
dezren39 merged 4 commits into
mainfrom
queue/17384-8904-id-ci
Nov 15, 2026
Merged

dezren39 merged 4 commits into
mainfrom
queue/17384-8904-id-ci

Conversation

@dezren39

@dezren39 dezren39 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Fixes the code-side failures of the broken main id workflow tracked in #8904 (run 43745000827, breakage f00ef4935f08). Issue #8904 stays open: the prod-lines-check failures (7 files over the 2,500-line limit) are split out in #8590-#8594 and land separately; a green post-merge id run is the final confirmation.

What was broken -> fix

  1. E0382 borrow of moved value — crates/id-cli/src/commands/serve.rs: endpoint was moved into Router::builder and borrowed again for AppState (transfer endpoint from id(web): send selected files to another server (#5346) #10506). Now cloned at the builder call. This one error blocked cargo-check, test-unit, test-shards, test-web-unit and the crash-gate checks.
  2. clippy -D clippy::unwrap_used in production code — crates/id-core/src/canonical_cbor.rs try_into().unwrap() x3 now map the error to CborError::UnexpectedEof.
  3. clippy denied lints across test code — the workspace denies unwrap_used/expect_used/panic and cargo surfaces one crate layer at a time. Test modules across id-core, id-caps, id-worlds, id-web, id-sync and the root id crate (boards, device_bridge, grants, hosted_export, grant_service, tests/admission_path_coverage.rs) get the module-level allow that is already the in-tree convention for test code. Production sites were fixed properly instead: id-web world_ws lock access recovers from mutex poisoning, the b01 key-lifecycle expect becomes a typed LifecycleError::NotEnrolled, and grant_service confirm/reconcile invariant expects carry fn-level justified allows (the src/currency.rs precedent).
  4. tests/dht_testnet.rs did not compile — it imports iroh_mainline_address_lookup, which the root package never declared. Added as a dev-dependency (0.6, already in the lock via id-sync); Cargo.lock updated.
  5. Formatter drift — cargo fmt, biome (12 files), prettier (WEB.md), nixfmt (nix-common.nix) outputs applied.

Verification (local, this branch)

  • cargo check --all-targets --all-features — PASS
  • cargo clippy --all-targets --all-features — PASS (exit 0)
  • cargo clippy -p id-native-shell --all-targets — PASS (exit 0)
  • cargo fmt --all -- --check, biome format check, prettier --check, nixfmt --check — PASS

Notes

  • A detached workhorse session is also working main-broken: developing-today/code id @1920f34 — basic: nix flake check (biome-check) #8904 in a separate worktree (branch fix/id-8904-cargo-check); this PR supersedes that partial fmt-only snapshot.

  • CI on the failing run also showed Magic Nix Cache throttling (HTTP 418) noise on some fmt jobs — infra, not code.

  • cargo test --all-features --lib — 3,359 passed; the single failure (id-web test_load_asset_urls_from_manifest) was the missing local web-asset build in the worktree and passes once just web has run (verified) — in CI the assets are built before tests.

repo-worker-tmp-code-b added 2 commits November 15, 2026 13:45
Test modules use unwrap/expect/panic pervasively while the workspace denies those lints; apply the in-tree convention of module-level allows on test code (id-core, id-caps, id-worlds, id-web, id-sync tests, and the id crate test modules in boards/device_bridge/grants/hosted_export/grant_service plus tests/admission_path_coverage.rs). Production sites fixed properly: world_ws poison-recovering lock access, grant_service invariant expects get fn-level justified allows (currency.rs precedent), b01 key lifecycle expect becomes a typed NotEnrolled error. Also add the missing iroh-mainline-address-lookup dev-dependency so tests/dht_testnet.rs compiles under --all-features (Cargo.lock updated).
@dezren39
dezren39 requested a review from a team as a code owner November 15, 2026 20:23
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T20:23:05.378431Z
We couldn’t complete this review. Comment @codex review to try again.
e33f12c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.6.3)

pkgs/id/examples/roc-import-policy/fixtures.json

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

pkgs/id/hosted-worker/src/routing.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

pkgs/id/hosted-worker/src/user-do.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

  • 9 others
Clippy (1.99.1)

Clippy execution timed out

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

Agent note — duplicate salvage + merge disposition (task 17384, lane code-b)

Canonical PR for issue #8904 is this PR (#10548, branch queue/17384-8904-id-ci, bound to task 17384). Duplicate PR #10542 (fix/id-8904-cargo-check, fmt-only + dht dev-dep) was diffed against this PR file-by-file and content-by-content before closing:

  • Formatting changes: covered here, except two taplo hunks (multi-line features arrays in crates/id-native-shell/Cargo.toml and crates/id-sync/Cargo.toml) that were unique to PR fix(id): apply formatting for nix flake checks #10542 — salvaged into this branch verbatim.
  • dht_testnet dev-dependency (iroh-mainline-address-lookup): already present here; only the comment wording differed — nothing unique.
  • The gateway.rs test in PR fix(id): apply formatting for nix flake checks #10542's history came from its base snapshot commit and is already on main; not duplicate-authored work. After merging current main into this branch, cargo fmt was re-run so that test is formatted too.

Codex disposition: the Codex review on e33f12c failed to complete (Codex usage limits reached, per the bot's own comment); there are zero inline Codex findings on this PR to disposition.

main has been merged into this branch (clean merge; main's only pkgs/id changes since the branch base were the gateway test and one serve.rs line).

@dezren39
dezren39 merged commit 4387d68 into main Nov 15, 2026
1 check failed
@dezren39
dezren39 deleted the queue/17384-8904-id-ci branch November 15, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant